Frontend Forever App
We have a mobile app for you to download and use. And you can unlock many features in the app.
Get it now
Intall Later
Run
HTML
CSS
Javascript
Output
Document
@charset "UTF-8"; @import url(https://fonts.googleapis.com/css?family=Nunito+Sans:300,400,600,700,800); *, :after, :before { box-sizing: border-box; padding: 0; margin: 0; } :root { --title: "'The Ring' Movie Tribute"; --author: "Matt Cannon"; --contact: "mc@mattcannon.design"; --description: "A tribute to one of the scariest movies ever made, enhanced with a chilling, possibly humorous glitch effect. The Ring is a horror classic, making it the perfect fit for spooky season."; --keywords: "codepenchallenge, cpc-halloween-movies, halloween, horror, glitch, the-ring, spooky, movie-tribute, glitch-effect"; --last-modified: "2024-10-21"; --content-language: "en"; --generator: "HTML5, CSS3, JavaScript"; } .gradient { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: linear-gradient( to left, rgba(0, 0, 0, 0.6) 0%, transparent 20%, transparent 80%, rgba(0, 0, 0, 0.6) 100% ), radial-gradient(rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.2)); z-index: 5; box-sizing: border-box; margin: 0; padding: 0; } html, body { margin: 0; padding: 0; height: 100%; width: 100%; overflow: hidden; } .gradient::before, .gradient::after { position: fixed; width: 100vw; height: 100vh; content: " "; box-sizing: border-box; } .brick-wall { position: fixed; content: " "; top: 0; left: 0; right: 0; bottom: 140px; background: url(https://mattcannon.games/codepen/halloween-movies/ring-wall.jpg); background-size: 400px; box-shadow: 0 8px 10px rgba(0, 0, 0, 0.8); z-index: 2; } .wood-floor { position: fixed; content: " "; width: 100%; height: 140px; bottom: 0; left: 0; -ms-perspective: 300px; -webkit-perspective: 300px; perspective: 300px; overflow: hidden; z-index: 1; } .wood-floor::before { position: absolute; content: " "; top: -100%; left: -25%; width: 150%; height: 250%; background: url(https://mattcannon.games/codepen/halloween-movies/floor.jpg); background-size: 400px; -webkit-transform: rotateX(60deg); transform: rotateX(60deg); } html > body .old-tv * { outline: none; } .old-tv { position: absolute; width: 870px; height: 465px; bottom: 160px; left: 50%; margin-left: -455px; background: #333; padding: 20px; border-radius: 8px; border-bottom: 4px #222 solid; box-shadow: inset 0 -220px 200px rgba(0, 0, 0, 0.5), 50px 2px 20px rgba(0, 0, 0, 0.4), -50px 2px 20px rgba(0, 0, 0, 0.4); -webkit-transform: scale(0.4); transform: scale(0.4); z-index: 600; } .old-tv::after { content: " "; position: absolute; top: 54px; left: 52px; width: 600px; height: 400px; background: rgba(255, 255, 255, 0.4); border-radius: 5% / 50%; -webkit-filter: blur(30px); filter: blur(30px); z-index: 100; -webkit-animation: screen 800ms infinite linear; animation: screen 800ms infinite linear; } @-webkit-keyframes screen { 0% { -webkit-transform: scale(1.03); transform: scale(1.03); } 50% { -webkit-transform: scale(1); transform: scale(1); } 100% { -webkit-transform: scale(1.03); transform: scale(1.03); } } @keyframes screen { 0% { -webkit-transform: scale(1.03); transform: scale(1.03); } 50% { -webkit-transform: scale(1); transform: scale(1); } 100% { -webkit-transform: scale(1.03); transform: scale(1.03); } } .old-tv .antenna { position: absolute; width: 200px; height: 20px; background: #222; top: -20px; left: 240px; border-top-left-radius: 50%; border-top-right-radius: 50%; box-shadow: inset 0 5px #444, inset 0 -2px 5px #000; } .old-tv .antenna:before { content: " "; position: absolute; bottom: 8px; left: 40px; width: 12px; height: 250px; background-color: #444; background-image: -webkit-linear-gradient( rgba(255, 255, 255, 0.1), transparent ); background-image: linear-gradient(rgba(255, 255, 255, 0.1), transparent); -webkit-transform: rotate(-20deg); transform: rotate(-20deg); border-top-left-radius: 40%; border-top-right-radius: 40%; box-shadow: inset -1px 1px rgba(255, 255, 255, 0.4), inset 5px 0 5px rgba(0, 0, 0, 0.5), -8px 5px 15px rgba(0, 0, 0, 0.5); z-index: -1; } .old-tv .antenna:after { content: " "; position: absolute; bottom: 8px; left: 150px; width: 12px; height: 250px; background: #444; background-image: -webkit-linear-gradient( rgba(255, 255, 255, 0.1), transparent ); background-image: linear-gradient(rgba(255, 255, 255, 0.1), transparent); -webkit-transform: rotate(20deg); transform: rotate(20deg); border-top-left-radius: 40%; border-top-right-radius: 40%; box-shadow: inset -1px 1px rgba(255, 255, 255, 0.4), inset 5px 0 5px rgba(0, 0, 0, 0.5), -10px 5px 15px rgba(0, 0, 0, 0.5); z-index: -1; } .old-tv main { position: relative; display: inline-block; padding: 30px; border-radius: 8px; background: #444; border: 3px #aaa solid; box-shadow: 0 10px 8px rgba(0, 0, 0, 0.4); vertical-align: top; } .old-tv main::before { content: " "; position: absolute; top: 0; left: 0; box-sizing: border-box; width: 100%; height: 100%; border-radius: 8px; border-style: solid; border-width: 80px 90px 77px 90px; border-color: rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.2) transparent rgba(0, 0, 0, 0.2); z-index: 1; } .old-tv main::after { content: " "; position: absolute; top: 0; left: 0; box-sizing: border-box; width: 100%; height: 100%; background: -webkit-radial-gradient( rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0) 100% ), -webkit-linear-gradient(rgba(0, 0, 0, 0.1) 10%, transparent); background: radial-gradient(rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0) 100%), linear-gradient(rgba(0, 0, 0, 0.1) 10%, transparent); z-index: 2; } .old-tv .speaker { position: absolute; width: 200px; height: 260px; top: 20px; right: 20px; padding: 10px; box-sizing: border-box; } .old-tv .speaker::before { content: " "; position: absolute; top: 0%; left: 15px; right: 0%; bottom: 0%; background: -webkit-repeating-linear-gradient( 90deg, rgba(255, 255, 255, 0.1) 0px, rgba(0, 0, 0, 0.2) 5px, rgba(0, 0, 0, 0.2) 6px, transparent 5px, rgba(0, 0, 0, 0.6) 10px ); background: repeating-linear-gradient( 0deg, rgba(255, 255, 255, 0.1) 0px, rgba(0, 0, 0, 0.2) 5px, rgba(0, 0, 0, 0.2) 6px, transparent 5px, rgba(0, 0, 0, 0.6) 10px ); border-radius: 20px; border: 2px #111 solid; box-shadow: 0 1px 3px rgba(255, 255, 255, 0.5), 0 4px 15px rgba(0, 0, 0, 0.6); z-index: 2; } .old-tv .speaker::after { content: " "; position: absolute; height: 200px; left: 50px; right: 38px; bottom: 30px; background: #222; border-radius: 100% / 100%; box-shadow: inset 0 1px black; opacity: 0.1; z-index: 1; } .old-tv .volume { position: absolute; width: 180px; height: 40px; right: 20px; bottom: 145px; border-radius: 4px; box-shadow: inset 2px 2px rgba(255, 255, 255, 0.1), inset -2px -2px rgba(0, 0, 0, 0.3), 0 1px 1px rgba(255, 255, 255, 0.2), 0 4px 10px rgba(0, 0, 0, 0.4); border: 2px #000 solid; } .old-tv .channel { position: absolute; width: 180px; height: 40px; right: 20px; bottom: 90px; border-radius: 4px; box-shadow: inset 2px 2px rgba(255, 255, 255, 0.1), inset -2px -2px rgba(0, 0, 0, 0.3), 0 1px 1px rgba(255, 255, 255, 0.2), 0 4px 10px rgba(0, 0, 0, 0.4); border: 2px #000 solid; } .old-tv input[type="range"] { -webkit-appearance: none; position: absolute; width: 80%; left: 10%; box-sizing: border-box; background: none; margin: 18px 0; } .old-tv input[type="range"]:focus { outline: none; } .old-tv input[type="range"]::-webkit-slider-runnable-track { width: 100%; height: 5px; cursor: pointer; box-shadow: 1px 1px 1px rgba(255, 255, 255, 0.2); background: #000; border-radius: 1.3px; } .old-tv input[type="range"]::-webkit-slider-thumb { height: 25px; width: 10px; border-radius: 2px; background-color: #444; background-image: -webkit-linear-gradient( rgba(255, 255, 255, 0.1), transparent ); background-image: linear-gradient(rgba(255, 255, 255, 0.1), transparent); box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.2), 1px 1px 6px black; cursor: pointer; -webkit-appearance: none; margin-top: -10px; } .old-tv .power { position: absolute; width: 180px; height: 60px; right: 20px; bottom: 15px; border-radius: 4px; box-shadow: inset 2px 2px rgba(255, 255, 255, 0.1), inset -2px -2px rgba(0, 0, 0, 0.3), 0 1px 1px rgba(255, 255, 255, 0.2), 0 4px 10px rgba(0, 0, 0, 0.4); border: 2px #000 solid; } .old-tv .power > button { position: relative; width: 70px; height: 40px; top: 10px; left: 10px; background-color: #333; background-image: -webkit-linear-gradient( rgba(255, 255, 255, 0.05), transparent ); background-image: linear-gradient(rgba(255, 255, 255, 0.05), transparent); border-radius: 4px; box-shadow: inset 1px 1px rgba(255, 255, 255, 0.1), inset 1px 1px rgba(255, 255, 255, 0.1), inset -1px -1px rgba(0, 0, 0, 0.3), 0 1px 1px rgba(255, 255, 255, 0.2); border: 2px #000 solid; cursor: pointer; } .old-tv .power::after { content: " Power "; position: absolute; font-family: Arial; font-size: 10px; color: #ccc; width: 5px; height: 5px; top: 18px; left: 100px; bottom: 30px; background: #7cfc00; box-shadow: 0 0 10px #7cfc00, 0 0 5px #7cfc00; border: 1px #7cfc00 solid; border-radius: 50%; line-height: 5px; text-indent: 12px; text-shadow: 0 1px #000; } .old-tv .power::before { content: " Standby "; position: absolute; font-family: Arial; font-size: 10px; color: #ccc; width: 5px; height: 5px; top: 38px; left: 100px; bottom: 30px; background: #a52a2a; border: 1px #111 solid; border-radius: 50%; line-height: 5px; text-indent: 12px; text-shadow: 0 1px #000; } .old-tv footer { position: absolute; height: 15px; bottom: -22px; left: 15px; right: 15px; background: #222; border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; box-shadow: inset 0 5px 5px rgba(0, 0, 0, 0.8), 0 10px 25px rgba(0, 0, 0, 0.3); border-bottom: 3px #000 solid; z-index: -1; } .error-noise { position: relative; width: 600px; height: 400px; overflow: hidden; border-radius: 5% / 50%; z-index: 3; } .error-effect { position: absolute; width: 100%; height: 100%; border-radius: 50% / 5%; background: #111; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAUVBMVEWFhYWDg4N3d3dtbW17e3t1dXWBgYGHh4d5eXlzc3OLi4ubm5uVlZWPj4+NjY19fX2JiYl/f39ra2uRkZGZmZlpaWmXl5dvb29xcXGTk5NnZ2c8TV1mAAAAG3RSTlNAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAvEOwtAAAFVklEQVR4XpWWB67c2BUFb3g557T/hRo9/WUMZHlgr4Bg8Z4qQgQJlHI4A8SzFVrapvmTF9O7dmYRFZ60YiBhJRCgh1FYhiLAmdvX0CzTOpNE77ME0Zty/nWWzchDtiqrmQDeuv3powQ5ta2eN0FY0InkqDD73lT9c9lEzwUNqgFHs9VQce3TVClFCQrSTfOiYkVJQBmpbq2L6iZavPnAPcoU0dSw0SUTqz/GtrGuXfbyyBniKykOWQWGqwwMA7QiYAxi+IlPdqo+hYHnUt5ZPfnsHJyNiDtnpJyayNBkF6cWoYGAMY92U2hXHF/C1M8uP/ZtYdiuj26UdAdQQSXQErwSOMzt/XWRWAz5GuSBIkwG1H3FabJ2OsUOUhGC6tK4EMtJO0ttC6IBD3kM0ve0tJwMdSfjZo+EEISaeTr9P3wYrGjXqyC1krcKdhMpxEnt5JetoulscpyzhXN5FRpuPHvbeQaKxFAEB6EN+cYN6xD7RYGpXpNndMmZgM5Dcs3YSNFDHUo2LGfZuukSWyUYirJAdYbF3MfqEKmjM+I2EfhA94iG3L7uKrR+GdWD73ydlIB+6hgref1QTlmgmbM3/LeX5GI1Ux1RWpgxpLuZ2+I+IjzZ8wqE4nilvQdkUdfhzI5QDWy+kw5Wgg2pGpeEVeCCA7b85BO3F9DzxB3cdqvBzWcmzbyMiqhzuYqtHRVG2y4x+KOlnyqla8AoWWpuBoYRxzXrfKuILl6SfiWCbjxoZJUaCBj1CjH7GIaDbc9kqBY3W/Rgjda1iqQcOJu2WW+76pZC9QG7M00dffe9hNnseupFL53r8F7YHSwJWUKP2q+k7RdsxyOB11n0xtOvnW4irMMFNV4H0uqwS5ExsmP9AxbDTc9JwgneAT5vTiUSm1E7BSflSt3bfa1tv8Di3R8n3Af7MNWzs49hmauE2wP+ttrq+AsWpFG2awvsuOqbipWHgtuvuaAE+A1Z/7gC9hesnr+7wqCwG8c5yAg3AL1fm8T9AZtp/bbJGwl1pNrE7RuOX7PeMRUERVaPpEs+yqeoSmuOlokqw49pgomjLeh7icHNlG19yjs6XXOMedYm5xH2YxpV2tc0Ro2jJfxC50ApuxGob7lMsxfTbeUv07TyYxpeLucEH1gNd4IKH2LAg5TdVhlCafZvpskfncCfx8pOhJzd76bJWeYFnFciwcYfubRc12Ip/ppIhA1/mSZ/RxjFDrJC5xifFjJpY2Xl5zXdguFqYyTR1zSp1Y9p+tktDYYSNflcxI0iyO4TPBdlRcpeqjK/piF5bklq77VSEaA+z8qmJTFzIWiitbnzR794USKBUaT0NTEsVjZqLaFVqJoPN9ODG70IPbfBHKK+/q/AWR0tJzYHRULOa4MP+W/HfGadZUbfw177G7j/OGbIs8TahLyynl4X4RinF793Oz+BU0saXtUHrVBFT/DnA3ctNPoGbs4hRIjTok8i+algT1lTHi4SxFvONKNrgQFAq2/gFnWMXgwffgYMJpiKYkmW3tTg3ZQ9Jq+f8XN+A5eeUKHWvJWJ2sgJ1Sop+wwhqFVijqWaJhwtD8MNlSBeWNNWTa5Z5kPZw5+LbVT99wqTdx29lMUH4OIG/D86ruKEauBjvH5xy6um/Sfj7ei6UUVk4AIl3MyD4MSSTOFgSwsH/QJWaQ5as7ZcmgBZkzjjU1UrQ74ci1gWBCSGHtuV1H2mhSnO3Wp/3fEV5a+4wz//6qy8JxjZsmxxy5+4w9CDNJY09T072iKG0EnOS0arEYgXqYnXcYHwjTtUNAcMelOd4xpkoqiTYICWFq0JSiPfPDQdnt+4/wuqcXY47QILbgAAAABJRU5ErkJggg==); background-size: 80%; -webkit-animation: noise 200ms infinite linear; animation: noise 200ms infinite linear; } .error-effect::before { content: " "; position: absolute; width: 100%; height: 20%; background: rgba(255, 255, 255, 0.2); -webkit-animation: noiseeffect 4000ms infinite linear; animation: noiseeffect 4000ms infinite linear; border-radius: 50% / 5%; } .error-effect::after { content: " "; position: absolute; width: 100%; height: 100%; background: -webkit-radial-gradient( rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.8) ), -webkit-linear-gradient(rgba(255, 255, 255, 0.4) 10%, transparent); background: radial-gradient(rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.8)), linear-gradient(rgba(255, 255, 255, 0.4) 10%, transparent); box-shadow: inset 0 5px 25px rgba(255, 255, 255, 0.2), inset 5px 0 15px rgba(255, 255, 255, 0.2), inset -5px 0 15px rgba(255, 255, 255, 0.1), 0 0 10px black, inset 0 200px 5px rgba(255, 255, 255, 0.05); border-radius: 50% / 5%; } .old-tv-content { position: absolute; width: 150%; /* Zoom in by increasing the width and height */ height: 150%; top: -20%; /* Move the video upwards to hide the YouTube title */ left: -25%; /* Center the video horizontally */ border-radius: 5% / 50%; border: none; /* Remove iframe borders */ z-index: 5; opacity: 1; /* Ensure visibility */ } .old-tv-content::after { content: " "; position: absolute; width: 100%; height: 100%; background: -webkit-repeating-linear-gradient( 0, #fff, #fff 2px, transparent 4px ); background: repeating-linear-gradient(0, #fff, #fff 2px, transparent 4px); opacity: 0.2; border-radius: 50% / 5%; -webkit-animation: crt-pixels 20ms alternate infinite; animation: crt-pixels 20ms alternate infinite; } @-webkit-keyframes crt-image { 0% { -webkit-transform: translateY(-1px); transform: translateY(-1px); } 100% { -webkit-transform: translateY(0px); transform: translateY(0px); } } @keyframes crt-image { 0% { -webkit-transform: translateY(-1px); transform: translateY(-1px); } 100% { -webkit-transform: translateY(0px); transform: translateY(0px); } } @-webkit-keyframes crt-pixels { 0% { -webkit-transform: translateY(-3px); transform: translateY(-3px); } 100% { -webkit-transform: translateY(0px); transform: translateY(0px); } } @keyframes crt-pixels { 0% { -webkit-transform: translateY(-3px); transform: translateY(-3px); } 100% { -webkit-transform: translateY(0px); transform: translateY(0px); } } @-webkit-keyframes noise { 0% { background-position: 0px 1000px; } 50% { background-position: -1000px; } 100% { background-position: 100px 0px; } } @keyframes noise { 0% { background-position: 0px 1000px; } 50% { background-position: -1000px; } 100% { background-position: 100px 0px; } } @-webkit-keyframes noiseeffect { 0% { top: -20%; opacity: 0; } 20% { opacity: 0; } 50% { opacity: 0.8; } 80% { opacity: 0; } 100% { top: 100%; opacity: 0; } } @keyframes noiseeffect { 0% { top: -20%; opacity: 0; } 20% { opacity: 0; } 50% { opacity: 0.8; } 80% { opacity: 0; } 100% { top: 100%; opacity: 0; } } #table-tv { -ms-perspective: 800px; -webkit-perspective: 800px; perspective: 800px; position: absolute; overflow: hidden; width: 600px; height: 300px; left: 50%; bottom: 30px; margin-left: -300px; background: transparent; font-size: 250%; z-index: 500; } .face { background-image: url(https://jobs.levelhard.com.br/jobs/site_television/images/table-wood-texture.jpg); background-size: 100%; } .scene, .shape, .face, .face-wrapper, .cr { position: absolute; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; } .scene { width: 80em; height: 80em; top: 50%; left: 50%; margin: -38em 0 0 -40em; } .shape { top: 50%; left: 50%; width: 0; height: 0; -webkit-transform-origin: 50%; transform-origin: 50%; } .face, .face-wrapper { overflow: hidden; -webkit-transform-origin: 0 0; transform-origin: 0 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; /* hidden by default, prevent blinking and other weird rendering glitchs */ } html > body .face { background-size: 100% 100% !important; background-position: center; } .face-wrapper .face { left: 100%; width: 100%; height: 100%; } .photon-shader { position: absolute; left: 0; top: 0; width: 100%; height: 100%; } .side { left: 50%; } .cr, .cr .side { height: 100%; } [class*="cuboid"] .ft, [class*="cuboid"] .bk { width: 100%; height: 100%; } [class*="cuboid"] .bk { left: 100%; } [class*="cuboid"] .rt { -webkit-transform: rotateY(-90deg) translateX(-50%); transform: rotateY(-90deg) translateX(-50%); } [class*="cuboid"] .lt { -webkit-transform: rotateY(90deg) translateX(-50%); transform: rotateY(90deg) translateX(-50%); } [class*="cuboid"] .tp { -webkit-transform: rotateX(90deg) translateY(-50%); transform: rotateX(90deg) translateY(-50%); } [class*="cuboid"] .bm { -webkit-transform: rotateX(-90deg) translateY(-50%); transform: rotateX(-90deg) translateY(-50%); } [class*="cuboid"] .lt { left: 100%; } [class*="cuboid"] .bm { top: 100%; } /* .cub-1 styles */ .cub-1 { -webkit-transform: translate3D(0em, -5em, 0em) rotateX(0deg) rotateY(0deg) rotateZ(0deg); transform: translate3D(0em, -5em, 0em) rotateX(0deg) rotateY(0deg) rotateZ(0deg); opacity: 1; width: 12em; height: 0.2em; margin: -0.1em 0 0 -6em; } .cub-1 .ft { -webkit-transform: translateZ(2.625em); transform: translateZ(2.625em); } .cub-1 .bk { -webkit-transform: translateZ(-2.625em) rotateY(180deg); transform: translateZ(-2.625em) rotateY(180deg); } .cub-1 .rt, .cub-1 .lt { width: 5.25em; height: 0.2em; } .cub-1 .tp, .cub-1 .bm { width: 12em; height: 5.25em; } .cub-1 .face { background-color: #ffffff; } /* .cub-3 styles */ .cub-3 { -webkit-transform: translate3D(-4.0625em, -2.5em, -2.125em) rotateX(0deg) rotateY(0deg) rotateZ(12deg); transform: translate3D(-4.0625em, -2.5em, -2.125em) rotateX(0deg) rotateY(0deg) rotateZ(12deg); opacity: 1; width: 0.2em; height: 5em; margin: -2.5em 0 0 -0.1em; } .cub-3 .ft { -webkit-transform: translateZ(0.1em); transform: translateZ(0.1em); } .cub-3 .bk { -webkit-transform: translateZ(-0.1em) rotateY(180deg); transform: translateZ(-0.1em) rotateY(180deg); } .cub-3 .rt, .cub-3 .lt { width: 0.2em; height: 5em; } .cub-3 .tp, .cub-3 .bm { width: 0.2em; height: 0.2em; } .cub-3 .face { background-color: #ffffff; } /* .cub-4 styles */ .cub-4 { -webkit-transform: translate3D(-4.125em, -2.5em, 2.125em) rotateX(0deg) rotateY(0deg) rotateZ(12deg); transform: translate3D(-4.125em, -2.5em, 2.125em) rotateX(0deg) rotateY(0deg) rotateZ(12deg); opacity: 1; width: 0.2em; height: 5em; margin: -2.5em 0 0 -0.1em; } .cub-4 .ft { -webkit-transform: translateZ(0.1em); transform: translateZ(0.1em); } .cub-4 .bk { -webkit-transform: translateZ(-0.1em) rotateY(180deg); transform: translateZ(-0.1em) rotateY(180deg); } .cub-4 .rt, .cub-4 .lt { width: 0.2em; height: 5em; } .cub-4 .tp, .cub-4 .bm { width: 0.2em; height: 0.2em; } .cub-4 .face { background-color: #ffffff; } /* .cub-5 styles */ .cub-5 { -webkit-transform: translate3D(4em, -2.5em, -2.125em) rotateX(0deg) rotateY(0deg) rotateZ(-13deg); transform: translate3D(4em, -2.5em, -2.125em) rotateX(0deg) rotateY(0deg) rotateZ(-13deg); opacity: 1; width: 0.2em; height: 5em; margin: -2.5em 0 0 -0.1em; } .cub-5 .ft { -webkit-transform: translateZ(0.1em); transform: translateZ(0.1em); } .cub-5 .bk { -webkit-transform: translateZ(-0.1em) rotateY(180deg); transform: translateZ(-0.1em) rotateY(180deg); } .cub-5 .rt, .cub-5 .lt { width: 0.2em; height: 5em; } .cub-5 .tp, .cub-5 .bm { width: 0.2em; height: 0.2em; } .cub-5 .face { background-color: #ffffff; } /* .cub-6 styles */ .cub-6 { -webkit-transform: translate3D(4em, -2.5em, 2.125em) rotateX(0deg) rotateY(0deg) rotateZ(-13deg); transform: translate3D(4em, -2.5em, 2.125em) rotateX(0deg) rotateY(0deg) rotateZ(-13deg); opacity: 1; width: 0.2em; height: 5em; margin: -2.5em 0 0 -0.1em; } .cub-6 .ft { -webkit-transform: translateZ(0.1em); transform: translateZ(0.1em); } .cub-6 .bk { -webkit-transform: translateZ(-0.1em) rotateY(180deg); transform: translateZ(-0.1em) rotateY(180deg); } .cub-6 .rt, .cub-6 .lt { width: 0.2em; height: 5em; } .cub-6 .tp, .cub-6 .bm { width: 0.2em; height: 0.2em; } .cub-6 .face { background-color: #ffffff; } /* .cub-2 styles */ .cub-2 { -webkit-transform: translate3D(0em, -3.5em, 0em) rotateX(0deg) rotateY(0deg) rotateZ(0deg); transform: translate3D(0em, -3.5em, 0em) rotateX(0deg) rotateY(0deg) rotateZ(0deg); opacity: 1; width: 10em; height: 0.2em; margin: -0.1em 0 0 -5em; } .cub-2 .ft { -webkit-transform: translateZ(2.625em); transform: translateZ(2.625em); } .cub-2 .bk { -webkit-transform: translateZ(-2.625em) rotateY(180deg); transform: translateZ(-2.625em) rotateY(180deg); } .cub-2 .rt, .cub-2 .lt { width: 5.25em; height: 0.2em; } .cub-2 .tp, .cub-2 .bm { width: 10em; height: 5.25em; } .cub-2 .face { background-color: #ffffff; } /* Poster container to center the poster */ .poster-container { display: flex; justify-content: center; /* Horizontally center */ align-items: center; /* Vertically center */ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); /* Perfect centering */ width: 20vw; /* Adjust as needed */ height: 30vw; /* Adjust as needed */ } /* Frame around the poster */ .poster-frame { width: 100%; height: 100%; border: 1vw solid #d51e24; /* Color of the frame (you can adjust) */ box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.5); /* Optional shadow */ position: relative; display: flex; justify-content: center; align-items: center; } /* The poster itself */ .poster { width: 90%; /* Fit inside the frame */ height: 90%; background-image: url("https://placehold.co/400x600"); /* Replace with your poster image URL */ background-size: cover; /* Ensures the image fills the area */ background-position: center; background-repeat: no-repeat; } .glitch-image { position: fixed; top: 0; left: 0; width: 100vw; /* Full viewport width */ height: 100vh; /* Full viewport height */ z-index: 9999; /* Ensure it appears in front of everything */ display: none; /* Initially hidden */ background-color: rgba( 0, 0, 0, 0.7 ); /* Semi-transparent background to mimic a glitch effect */ /* Flexbox to center the image */ display: flex; justify-content: center; /* Horizontally center */ align-items: center; /* Vertically center */ } .glitch-image img { width: 600px; /* Set to 600px width */ height: 900px; /* Set to 400px height */ object-fit: cover; /* Ensure the image scales without distortion */ animation: glitch 200ms infinite; display: block; /* Make sure image behaves like a block-level element */ margin: 0 auto; /* Ensure centering in case there are inline issues */ } /* Glitch animation */ @keyframes glitch { 0% { transform: translate(0); } 20% { transform: translate(-5px, 5px); opacity: 0.8; } 40% { transform: translate(5px, -5px); opacity: 1; } 60% { transform: translate(-3px, 3px); opacity: 0.7; } 80% { transform: translate(3px, -3px); opacity: 0.9; } 100% { transform: translate(0); opacity: 1; } }
console.log("Event Fired") window.addEventListener("load", () => { const glitchImage = document.querySelector(".glitch-image"); // Select the glitch image // Ensure the glitch image element exists if (glitchImage) { console.log("Glitch image found in the DOM"); // Show the glitch image after X seconds setTimeout(() => { console.log("Showing glitch image..."); glitchImage.style.display = "block"; // Show glitch image glitchImage.classList.add("glitching"); // Add glitching animation // Hide the image after 4 seconds setTimeout(() => { console.log("Hiding glitch image..."); glitchImage.style.display = "none"; glitchImage.classList.remove("glitching"); // Reset for the next appearance }, 4000); // Hide after 4 seconds }, 38500); // Trigger after 38.5 seconds } else { console.error("Glitch image not found in the DOM."); } });